package com.rentong.page;

import com.rentong.json.JsonUtils;

import javax.servlet.http.HttpServletResponse;
import java.util.List;

/**
 * @author ZXY
 * @ClassName: SelectNode
 * @Description:
 * @date 2017/10/20 9:39
 */
public class SelectNode {
    //下拉值id
    private Integer id;

    //下拉展示名称
    private String text;

    public SelectNode() {
    }

    public SelectNode(Integer id, String text) {
        this.id = id;
        this.text = text;
    }

    public Integer getId() {
        return id;
    }

    public void setId(Integer id) {
        this.id = id;
    }

    public String getText() {
        return text;
    }

    public void setText(String text) {
        this.text = text;
    }

    /**
     * json 序列化输出
     */
    public static void writeJson(List<SelectNode> selectNodeList, HttpServletResponse response) {
        JsonUtils.sendJsonToPage(selectNodeList, response);
    }
}
